 const {
   app,
   BrowserWindow
 } = require('electron')

 function createWindow() {
   // 创建浏览器窗口
   let win = new BrowserWindow({
     width: 800,
     height: 600,
     webPreferences: {
       nodeIntegration: true
     }
   })

   // 加载index.html文件
   win.loadFile('./default.html')

   win.webContents.openDevTools();

 }

 app.whenReady().then(createWindow)